<template>
  <div class="department" id="department">
    <!-- 左侧部门管理 -->
    <!-- 右侧 -->
    <div class="department_right">
      <!--弹框 查看 -->
      <div class="Control-1 mechanism_dialogS closure">
        <el-dialog
          :title="dialogTitle"
          :modal-append-to-body="false"
          :show-close="false"
          :visible.sync="dialogEditVisible"
          v-loading="loadingEditDialog"
          element-loading-text="拼命加载中"
          element-loading-spinner="el-icon-loading"
          element-loading-background="rgba(0, 0, 0, 0.2)"
        >
          <div
            class="dialogBody common"
            :style="{ height: '650px' }"
            style="overflow: hidden"
          >
            <commonPage
              :commonData="commonData"
              @loadingShow="loadingShow"
            ></commonPage>
          </div>
        </el-dialog>
      </div>
    </div>
  </div>
</template>
<script>
import commonPage from "@/views/pitchManage/dyMonitorManage/pitchDetails/pitchDetailsPage"; //主页面列表

import {} from "@/api/request.js";
export default {
  name: "pitchDetails",
  data() {
    return {
      name: "pitchDetails", //按钮配置页面代号
      // ssformObj: formJs.ssformObj, //基本数据材料详情

      // typeData: [
      //   { text: "级配曲线", show: true },
      //   { text: "材料详情", show: false },
      // ],
      // level: [], //强度等级
      // earlyWarning: [], //预警标准
      // bhzDataList: [], //拌合站
      // bhjDataList: [], //拌合机
      // liqhDataList: [], //沥青混合料类型
      // value2: "", //主页面日期筛选绑定值

      // 列表配置项
      // table_config: formJs.table_config,
      // type_config: null,
      // tableData: [], //表格列表数据列表
      // highlightBd: true, //左侧机构树停留背景色
      // treelength: false, //左侧树显示隐藏
      // showName: "未选择公司",
      // fId: null, //点击当前列表数据fId
      // listLoading: false, //列表数据加载loading

      // // 列表给后端传参
      // getList: {
      //   fCompanyid: "", // 施工标段id
      //   startDates: "", // 开始时间
      //   endDates: "", // 截至时间
      //   stationId: "", //拌合站
      //   machineId: "", //拌合机
      //   fConstructionhorizon: "", // 施工层位
      //   fMixturetype: "", //  沥青混合料类型
      //   warningLevel: "", // 预警等级
      //   fCloseoperation: "", //闭合状态
      //   page: 1, // 当前页码
      //   pageSize: 20, // 每页显示条数
      // },
      // lqtableData: [],

      userInfo: {}, //登录用户

      loadingEditDialog: false, //弹框loading
      dialogEditVisible: true, //新增弹框是否显示
      dialogTitle: "查看",
      commonData: {
        fId: "",
        companyId: "",
      },
    };
  },
  components: {
    commonPage,
  },
  mounted() {
    this.userInfo = JSON.parse(sessionStorage.getItem("userInfo"));

    // var fId = window.location.href.split("=")[1].split("&")[0];
    // var companyId = window.location.href.split("=")[2];

    var aa =
      "http://www.xxx.com/loginfree?fId=8704ffff-f944-4bcc-b278-79a565ee1a56&companyId=b90483bd-adcc-4c3c-b887-e2b843b3d3b6";
    var fId = aa.split("=")[1].split("&")[0];
    var companyId = aa.split("=")[2];

    
    this.yj_viewForm(fId, companyId);
  },
  methods: {
    yj_viewForm(fId, companyId) {
      if (fId != "" && fId != null && companyId != "" && companyId != null) {
        this.dialogEditVisible = true;
        this.loadingEditDialog = true;
        this.commonData = {
          fId: fId,
          companyId: companyId,
        };
      } else {
        this.$message.error("查看数据详情失败");
        this.$router.go(-1);
        return;
      }
    },
    // 公共弹框是否显示
    loadingShow(e) {
      this.loadingEditDialog = e;
    },
  },
};
</script>
  
<style scoped lang="less">
// .dialogBody {
//   padding: 3px 20px;
//   height: 80%;
//   overflow-y: auto;
//   display: flex;
//   flex-direction: column;
//   .charts {
//     height: calc(100% - 30px);
//   }
// }

#department /deep/ .el-dialog {
  width: 100% !important;
  height: 100% !important;
  margin-top: 5vh !important;
}
</style>